   <#include
"../common/com.html"/> <@layout>
   	
<!-- ace styles -->
<link rel="stylesheet" href="${ctx}/static/assets/css/ace.min.css" />

<script type="text/javascript">
    /**
     * 新增
     */
    function saveModel() {
        var id=document.getElementById("id").value;
              if(Validator.Validate(document.getElementById('form1'))){
        } else {
            return;
        }
        
        url = '';
        if(id==""){
            url = '${ctx}/cpglCk/save';
        }     else{
            url = '${ctx}/cpglCk/update';
        }
        $('#form1').form('submit', {
            url : url,
            onSubmit : function() {
                return $(this).form('validate');
            },
            success : function(data) {
                alert(data);
                window.location.href=' ${ctx}/cpglCk';
            }
        });

    }
</script>
<div class="page-content">
<div class="row-fluid">
						<div class="span12">
                <form class="form-horizontal"  id="form1" method="post" >
                	<input type="hidden"  name="id" id="id"    >
								 								<div class="control-group">
									<label class="control-label">商品id:</label>
						<div class="controls"> <input id="wpid"
								name="wpid" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">出库数量:</label>
						<div class="controls"> <input id="cksl"
								name="cksl" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">出库原因 1 销售出库 2 退货出库3领用出库:</label>
						<div class="controls"> <input id="ckyy"
								name="ckyy" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								  								<div class="control-group">
									<label class="control-label">:</label>
						<div class="controls"> <input id="ckje"
								name="ckje" type="text"
								  style="min-height: 24px;"  />
							</div>
								 	</div>
								 

    
             </form>
        </div>
        	<div class="span12 center">
				<a  class="btn btn-info btn-small" onclick="saveModel()">确定
				<a href="#"  class="btn btn-danger btn-small bigger-110"  onclick="window.location.href=' ${ctx}/cpglCk'"  >取消 </a>
		</div>
    </div>
</div>

    </body>
   
    <script>
    	 /**
    * 修改页面使用
    */
  
 <#list newlist as m>
        document.getElementById("wpid").value  =  '${(m.wpid)!}';
        document.getElementById("cksl").value  =  '${(m.cksl)!}';
        document.getElementById("ckyy").value  =  '${(m.ckyy)!}';
        document.getElementById("ckje").value  =  '${(m.ckje)!}';
  
</#list>
    </script>
 </@layout> 
